import requestApi from "src/erm/sscrppublic/common/components/requestApi";

import {ajax } from 'nc-lightapp-front';


let requestDomain =  '';

let requestApiOverwrite = {
    ...requestApi,
    
    query:(opt) => {
         ajax({
            url: `${requestDomain}/nccloud/erm/expenseaccount/ExpenseaccountInvoiceListQueryAction.do`,
            data: opt.data,
            success: (data) => {
                data = data.data;
                opt.success(data);
            }
        })
    },

    transfer2Table: (prams) => {
        ajax({
            url: `${requestDomain}/nccloud/erm/expenseaccount/ExpenseaccountInvoiceToBxbodyAction.do`,
            data: prams.data,
            success: (data) => {
                data = data.data;
                prams.success(data);
            }
        })
    },

    delete: (prams) => {
        ajax({
            url: `${requestDomain}/nccloud/erm/expenseaccount/ExpenseaccountInvoiceDeleteAction.do`,
            data: prams.data,
            success: (data) => {
                prams.success(data);
            }
        })
    },

    showInvoiceImg: (prams) => {
        ajax({
            url: `${requestDomain}/nccloud/erm/erminvoice/ErmInvoiceSingleLinkAttachmentAction.do`,
            data: prams.data,
            success: (data) => {
                prams.success(data);
            },
            error: (err) => {
                console.log('error:', err)
            }
        })
    }
}

export default  requestApiOverwrite;